---
// src/components/FeatureCard.astro
import { Image } from "astro:assets";
export interface Props {
  title: string;
  description: string;
  iconSrc: ImageMetadata; 
}
const { title, description, iconSrc } = Astro.props;
---

<div class="feature-card">
    <div class="card-icon">
      <Image src={iconSrc} alt={`${title} icon`} width={48} height={48} />
    </div>
    <div class="card-content">
      <h3 class="card-title">{title}</h3>
      <p class="card-description">{description}</p>
    </div>
  </div>
<style>
  .feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 220px;
    margin: 0 auto;
    height:250px ;
  }

  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  }

  .card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    background: #f0f4ff;
    border-radius: 50%;
    margin-left: -100px;
    margin-top: 10px;
  }
  .card-title {
    padding-left: 15px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    text-align: left;
  }
  .card-description {
    padding-left:  15px; ;
    font-size: 0.95rem;
    color: #666;
    text-align: left;
    line-height: 1.5;
    margin: 0.5rem 0 0;
  }
  /* 响应式调整 */
  @media (max-width: 768px) {
    .feature-card {
      padding: 1.25rem;
      max-width: 100%;
    }
  }
</style>